package cn.springbook.cim.controller.index;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;

@Api(value="/", tags="主页(非接口)")
@Controller
public class IndexController {

    @ApiOperation(value="主页", notes = "主页")
    @GetMapping(value = "/")
    public String index(ModelMap map) {
    	map.put("type", "doc");
        return "index/index";
    }

    @ApiOperation(value="跳转BootStrap版API主页", notes = "跳转主页")
    @GetMapping(value = "/doc")
    public String indexDoc(ModelMap map) {
    	map.put("type", "doc");
        return "index/index";
    }
    
    @ApiOperation(value="跳转Swagger原生API主页", notes = "跳转主页")
    @GetMapping(value = "/swagger")
    public String indexSwagger(ModelMap map) {
    	map.put("type", "swagger");
        return "index/index";
    }
}
